package org.darkforest.enums;

/**
 * Created by valentina on 15/7/3.
 */
public enum ProxyApplyStageEnum {

    NEW(1), UPLOAD(2), SELECTGOODS(3),VIEWGOODS(4),WAITTING(5),COMPLETE(0);

    private Integer stage;

    public Integer getStage() {
        return stage;
    }

    public void setStage(Integer stage) {
        this.stage = stage;
    }

    private ProxyApplyStageEnum(Integer stage) {
        this.stage = stage;
    }

    public static ProxyApplyStageEnum getStageName(Integer stage){
        ProxyApplyStageEnum res = null;
        for(ProxyApplyStageEnum stageEnum : ProxyApplyStageEnum.values()){
            if(stage!=null && stageEnum.getStage()==stage){
                res = stageEnum;
            }
        }
        return res;
    }
}
